home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / ActView / ActiveViewer.jar / com / simeda / ActiveViewer / VNCViewer.class (.txt) < prev   
Encoding:
Java Class File  |  2001-12-12  |  2.0 KB  |  55 lines

  1. package com.simeda.ActiveViewer;
  2.  
  3. import javax.microedition.lcdui.Alert;
  4. import javax.microedition.lcdui.AlertType;
  5. import javax.microedition.lcdui.Display;
  6. import javax.microedition.lcdui.Image;
  7. import javax.microedition.midlet.MIDlet;
  8.  
  9. public class VNCViewer extends MIDlet {
  10.    static VNCViewer instance;
  11.    ConnectForm connectForm = null;
  12.    public Display display = null;
  13.  
  14.    public VNCViewer() {
  15.       instance = this;
  16.    }
  17.  
  18.    public void doShowForm() {
  19.       this.display.setCurrent(this.connectForm);
  20.    }
  21.  
  22.    public void startApp() {
  23.       System.out.println("Starting app");
  24.       this.connectForm = new ConnectForm(this);
  25.       if (this.display == null) {
  26.          this.display = Display.getDisplay(this);
  27.  
  28.          try {
  29.             Alert var1 = new Alert("ActiveViewer", "ActiveViewer v1.4.0\nVNC Viewer for MIDP\n(C) 2001 SIMEDA GmbH\nhttp://www.simeda.com/\nAuthor: Razvan Dragomirescu <drazvan@kappa.ro>\nAll rights reserved.", Image.createImage("/logo.png"), AlertType.INFO);
  30.             var1.setTimeout(-2);
  31.             this.display.setCurrent(var1, this.connectForm);
  32.          } catch (Exception var2) {
  33.             this.doShowForm();
  34.          }
  35.       } else {
  36.          System.out.println("Display is not null");
  37.          this.doShowForm();
  38.       }
  39.  
  40.    }
  41.  
  42.    public void pauseApp() {
  43.    }
  44.  
  45.    public void destroyApp(boolean var1) {
  46.       System.out.println("Destroying app");
  47.    }
  48.  
  49.    public static void quitApp() {
  50.       instance.destroyApp(true);
  51.       instance.notifyDestroyed();
  52.       instance = null;
  53.    }
  54. }
  55.